#include <iostream>
#include "RayTracer/Application.hpp"


int main( int argc, char** argv )
{
	using namespace RayTracer;
	
	google::ParseCommandLineFlags( &argc, &argv, true );
#if !defined( OS_WINDOWS )
	google::InstallFailureSignalHandler();
#endif
	google::LogToStderr();
	google::InitGoogleLogging( argv[ 0 ] );


	if( argc!=2 )
	{
		std::cout << "Usage: Raytracer <in scene>\n";
		return -1;
	}

	std::string		inScene( argv[ 1 ] );
	Application		app( inScene );

	int result	=	app.Run();
	google::ShutdownGoogleLogging();
	return result;
}
